<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML >
<html>
<head>
<base href="<%=basePath%>">

<title></title>
<link rel="stylesheet" href="css/result.css" type="text/css"></link>
<link rel="stylesheet" href="css/style.css" type="text/css"></link>
<style type="text/css">
.float_left {
	list-style-type: none;
	float: left;
	width: 90px;
}

.float_left1 {
	text-align: center;
	list-style-type: none;
	float: left;
	width: 120px;
}

.clear_float {
	clear: both;
}
</style>
</head>

<body>
	<c:if test="${empty loginMap}">
		<jsp:forward page="login.jsp"></jsp:forward>
	</c:if>
	<div style="height: 70px;"></div>
	<div class="main-div">
		<div>你好！欢迎来到首页</div>
		<div style=" width:100px; float: right;margin-top: -15px">
			<a href="users/exeit">注销</a>
		</div>
		<div class="clear_float"></div>
	</div>
	<div class="main-div">
		<div style="margin-top: 30px; float: left">
			<c:if test="${loginMap.supper eq 1}">
				<div style="line-height: 30px">
					<a href="users/findAllUsers?pageIndex=1&pageSize=3">微博管理</a>
				</div>
			</c:if>
			<c:if test="${loginMap.supper eq 0}">
				<div style="line-height: 30px">
					<a>微博管理</a>
				</div>
			</c:if>
			<c:if test="${loginMap.supper eq 1}">
				<div style="line-height: 30px">
					<a href="jsp/exditAccount.jsp">账户管理</a>
				</div>
			</c:if>
			<c:if test="${loginMap.supper eq 0}">
				<div style="line-height: 30px">
					<a>账户管理</a>
				</div>
			</c:if>
		</div>
		<div style="margin-top: 30px; float: left;margin-left: 50px">
			<h4>账户管理列表</h4>
			<div style="margin-top: 30px;">
				<ul style="margin-top: 30px;">
					<li class="float_left1">用户名</li>
					<li class="float_left1">昵称</li>
					<li class="float_left1">手机</li>
					<li class="float_left1">地址</li>
					<li class="float_left1">操作</li>

					<li class="clear_float"></li>
				</ul>
			</div>
			<div style="margin-top: 20px;">
				<c:forEach items="${usersList }" var="user">
					<ul style="margin-top: 30px;">
						<li class="float_left1">${user.username}</li>
						<li class="float_left1">${user.nickname }</li>
						<li class="float_left1">${user.mobile }</li>
						<li class="float_left1">${user.address }</li>
						<li class="float_left1"><a
							href="users/deleteMsgById?pageIndex=1&pageSize=3&id=${user.id}">删除</a>
						</li>
						<li class="clear_float"></li>
					</ul>
				</c:forEach>
			</div>
			<div style="margin-top: 30px;">
				<ul style="margin-top: 30px;">
					<li class="float_left">共${countMap.count}条记录</li>
					<li class="float_left">每页${pageSize}条</li>
					<li class="float_left">第<input type="text"
						value="${pageIndex}" style="width: 15px;" /> 页/共${totalPage}页</li>
					<li class="float_left"><a
						href="users/findAllUsers?pageIndex=1&pageSize=${pageSize}">第一页</a>
					</li>
					<c:if test="${pageIndex eq 1}">
						<li class="float_left"><a
							href="users/findAllUsers?pageIndex=1&pageSize=3" display>上一页</a>
						</li>
					</c:if>
					<c:if test="${pageIndex ne 1}">
						<li class="float_left"><a
							href="users/findAllUsers?pageIndex=${pageIndex-1}&pageSize=3">上一页</a>
						</li>
					</c:if>
					<c:if test="${pageIndex ne totalPage}">
						<li class="float_left"><a
							href="users/findAllUsers?pageIndex=${pageIndex+1}&pageSize=3">下一页</a>
						</li>
					</c:if>
					<c:if test="${pageIndex eq totalPage}">
						<li class="float_left"><a
							href="users/findAllUsers?pageIndex=${totalPage}&pageSize=3"
							display>下一页</a></li>
					</c:if>
					<li class="float_left"><a
						href="users/findAllUsers?pageIndex=${totalPage}&pageSize=3">最后一页</a>
					</li>
					<li class="float_left"><a href="#">转到第<input type="text"
							value="" style="width: 15px;" />页</a></li>
					<li class="clear_float"></li>
				</ul>
			</div>
			<div style="margin-top: 30px;">
				<a href="jsp/addAccount.jsp"><input type="button" value="添加数据" />
				</a>
			</div>

		</div>
	</div>
</body>
</html>
